package com.yj.change.hook;

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;

public class HTool {

    static void XHookMethod(String className, ClassLoader classLoader, final String methodName, final Object hookValue) {
        XposedHelpers.findAndHookMethod(className, classLoader, methodName, new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) {
                XposedBridge.log("=========Loaded app:" + methodName);
                param.setResult(hookValue);
            }
        });
    }
}
